home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 2
/
AACD 2.iso
/
AACD
/
Magazine
/
GraphicsCards
/
StormMesa
/
mklib.irix5
< prev
next >
Wrap
Text File
|
1998-12-15
|
2KB
|
60 lines
#!/bin/sh
# Make an IRIX 5.x DSO
#--identification------------------------------------------------------
# $Id: mklib.irix5,v 1.4 1997/10/21 23:32:31 brianp Exp $
# $Log: mklib.irix5,v $
# Revision 1.4 1997/10/21 23:32:31 brianp
# now takes major and minor version arguments
#
# Revision 1.3 1997/05/09 22:38:27 brianp
# added -lm to OBJECTS per Ronald Aarts
#
# Revision 1.2 1996/09/26 22:37:34 brianp
# replaced /usr/lib/libXext.a with -lXext
#
#--common--------------------------------------------------------------
# Usage: mklib libname major minor file.o ...
#
# First argument is name of output library (LIBRARY)
# Second arg is major version number (MAJOR)
# Third arg is minor version number (MINOR)
# Rest of arguments are object files (OBJECTS)
LIBRARY=$1
shift 1
MAJOR=$1
shift 1
MINOR=$1
shift 1
OBJECTS=$*
#--platform------------------------------------------------------------
# This is a bit of a kludge, but...
if test ${LIBRARY} = "libMesaGL.so" ; then
# must add libXext.a to MesaGL.so in case one relinks a precompiled
# OpenGL program which wasn't linked with -lXext or -lm.
OBJECTS="${OBJECTS} -lXext -lm"
fi
ld -shared -all -o ${LIBRARY} ${OBJECTS}
# You may want to add the following to the ld line:
# -soname <path>$LIBNAME
#
# where LIBNAME=`basename $LIBRARY` and <path> is where you're going to
# put Mesa's libraries. This may solve problems with the runtime
# loader/linker (rld) not being able to find the library.
# For example: -soname /usr/local/lib/$LIBNAME